package IoCz;

import Book.Book;
import Book.BookList;

public class IoReturn implements  IoCz{
    @Override
    public void ioCz(BookList bookList) {
        System.out.println("返还图书");
        System.out.println("请输入要返还图书的名字");
        String name = scanner.nextLine();
        for (int i = 0; i < bookList.booksize; i++) {
            Book book = bookList.books[i];
            if(name.equals(book.getName())){
                book.setBoo(false);
                System.out.println("返还成功");
                System.out.println(book);
                return;
            }
        }
    }
}
